public class TestSolution {
    public static void main(String[] args) {
        Solution solution = new Solution();

        // 测试用例 1：完全二叉树
        TreeNode root1 = new TreeNode(1);
        root1.left = new TreeNode(2);
        root1.right = new TreeNode(3);
        root1.left.left = new TreeNode(4);
        root1.left.right = new TreeNode(5);
        root1.right.left = new TreeNode(6);
        System.out.println("Test Case 1 (完全二叉树): " + solution.isCompleteTree(root1)); // 应输出 true

        // 测试用例 2：非完全二叉树（节点中间有空缺）
        TreeNode root2 = new TreeNode(1);
        root2.left = new TreeNode(2);
        root2.right = new TreeNode(3);
        root2.left.left = new TreeNode(4);
        root2.left.right = new TreeNode(5);
        root2.right.right = new TreeNode(7); // 右子节点空缺导致不完全
        System.out.println("Test Case 2 (非完全二叉树): " + solution.isCompleteTree(root2)); // 应输出 false

        // 测试用例 3：空树
        TreeNode root3 = null;
        System.out.println("Test Case 3 (空树): " + solution.isCompleteTree(root3)); // 应输出 true
    }
}